$OpenBSD: patch-ssl_c,v 1.3 2015/03/16 08:50:08 sthen Exp $
--- ssl.c.orig	Mon Mar 16 08:46:32 2015
+++ ssl.c	Mon Mar 16 08:47:53 2015
@@ -898,7 +898,7 @@ ssl_x509chain_load(X509 **crt, STACK_OF(X509) **chain,
 			goto leave3;
 	}
 
-#if (OPENSSL_VERSION_NUMBER < 0x1000200fL)
+#if defined(LIBRESSL_VERSION_NUMBER) || (OPENSSL_VERSION_NUMBER < 0x1000200fL)
 	tmpchain = tmpctx->extra_certs;
 #else /* OpenSSL >= 1.0.2 */
 	rv = SSL_CTX_get0_chain_certs(tmpctx, &tmpchain);
